import java.util.Scanner;
public class Demo3 {
    public static void main(String[] args) {
        String weather = "";
        while(!weather.equals("n"))
        {
            System.out.println("请输入一个天气字符：");
            weather = new Scanner(System.in).next();
            switch (weather) {
                case "D" -> System.out.println("干燥");
                case "M" -> System.out.println("潮湿");
                case "H" -> System.out.println("炎热");
                case "R" -> System.out.println("下雨");
                case "n" -> System.out.println("退出");
                default -> System.out.println("选择错误，请重新输入");
            }
        }
    }
}
